<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;

class ClassModel extends BaseModel
{
    use HasFactory;
    use SoftDeletes;
    protected $table = 'class';
    protected $primaryKey = 'id';
    protected $fillable = [
        'company_id',
        'name',
        'start_date',
        'min_num',
        'max_num',
        'total_num',
        'start_date',
        'status',
    ];

    public function courses() {
        return $this->hasMany(ClassCourseModel::class, 'class_id', 'id');
    }
}
